﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class danhsachtailieu : System.Web.UI.Page
{
    BUS_Document objD = new BUS_Document();
    BUS_ChildrenClass objCl = new BUS_ChildrenClass();
    BUS_TeacherClass objTl = new BUS_TeacherClass();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["ChildrenLogin"] != null)
            {
                string childrenid = Session["username"].ToString();
                var dataCl = objCl.ChildrenClass_getAllByChildrenid(childrenid);
                string classid = dataCl.Rows[0]["classid"].ToString();
                var dataTl = objTl.TeacherClass_getAllByClassid(classid);
                string teacherid = dataTl.Rows[0]["teacherid"].ToString();
                rptlstextbook.DataSource = objD.BUS_Document_getDataByTeacherid(teacherid);
                rptlstextbook.DataBind();
            }
        }
    }
}